home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / pc_board / gift4b12.zip / GIFTEST.DOC < prev    next >
Text File  |  1992-01-31  |  14KB  |  297 lines

  1.                               GIFtest 4.0ß
  2.                   CopyRight 1991 by Dave Navarro, Jr.
  3.  
  4. What is GIFtest?
  5.  
  6.      GIFtest is a command line utility to test GIF files to make sure
  7.      they are valid.  GIFtest scans the GIF header to make sure that
  8.      all the information stored is valid, and then scans the image
  9.      it self to make sure it's all there.  If everything is found in
  10.      order, GIFtest exits without any error messages or error levels.
  11.      However, if there is a problem with the GIF, GIFtest exits with
  12.      an error message letting you know what's wrong, and exits with
  13.      an error level.
  14.  
  15.      GIFtest is also capable of letting you know if a GIF has been
  16.      GIFLITE'd, has any extra bytes left by older transfer protocols,
  17.      modifying a BBS description to include the resolution of the GIF
  18.      (ProDooor and PCBoard), forcing all GIFs to be private uploads on
  19.      PCBoard and ProDoor BBSes, and rejecting GIFs that do not meet a
  20.      minimum definable resolution.
  21.  
  22.      When GIFs are transfered from user to user, or user to BBS or BBS
  23.      to user, their protocol sends files in packet sizes ranging from
  24.      128 bytes to 4k, and when they reach the end of a file, if the
  25.      remaining bytes do not equal the packet size, the packet is
  26.      "padded" with extra charactors to make it equal to the pack size.
  27.      Unfortunately, these bytes are not trimmed off when recieved by
  28.      older protocols.  It doesn't effect the file itself, but after
  29.      several hundred file transfers, you could end up with several
  30.      hundred "K" of wasted space.  GIFtest now automatically trims these
  31.      extra bytes from GIF files.
  32.  
  33.      GIFtest also conforms 100% to the GIF87a and GIF89a standards, so
  34.      will also process GIFs that contain "extensions".  These extensions
  35.      are also tested to make sure that all the "data blocks" have the
  36.      correct lengths and are valid.
  37.  
  38. NEW: Byte trimming is instantanious and no longer causes GIFtest to test
  39.      the GIF more than once.
  40.  
  41.      To register GIFtest, please send a check or money order for $15
  42.      to:
  43.             Dave Navarro, Jr.
  44.             64-38 Admiral Ave
  45.             Middle Village, NY 11379
  46.  
  47.      Please used the enclosed ORDER.FRM file.
  48.  
  49. Acknowledgements:
  50.  
  51.      The Graphics Interchange Format(c) is the Copyright property of
  52.      Compuserve Incorporated.  GIF(sm) is a Service Mark property of
  53.      Computerve Incorporated.
  54.  
  55.      Many thanks to the following individuals who have helped with the
  56.      testing of GIFtest and whose suggestions have helped GIFtest to
  57.      grow:
  58.  
  59.         Gary Foreman, SysOp of Another Dimension BBS
  60.         Thomas Enstall, SysOp of Hard Times BBS
  61.         Allen Legatzke, SysOp of Sattelite BBS
  62.         Chuck Valiceck, SysOp Suburban Software BBS
  63.         Max Bernard, SysOp of Taste BBS
  64.         Samuel Smith, Author of ProDoor
  65.         Jeffrey Morley, Author of ZipLab
  66.         Steve Rimmer, Author of "Bit-Mapped Graphics"
  67.  
  68. Support:
  69.  
  70.      The author can be reached through US Mail at the same address used
  71.      for registration, or through "electronic mail" left on The Bard's
  72.      Lair BBS at 718-381-3651.  The author also monitors the SHAREWARE
  73.      conference in the Intelec International Network of BBSs, and the
  74.      SHAREWARE conference in the MetroLink/RelayNet International
  75.      Network of BBSs.
  76.  
  77.      Because of the high cost of voice support, and the low cost of
  78.      GIFtest, voice support from the author is not available.  If it's
  79.      absolutely important that you recieve voice support, leave an
  80.      electronic message to the author on The Bard's Lair BBS and you
  81.      will recieve a "collect" call as soon as humanly possible.
  82.  
  83. How to use GIFtest:
  84.  
  85.     GIFtest 4.0ß has the following options:
  86.     Usage: GIFTEST filename.gif [option1] [option2] etc..
  87.        /A            -  Force private upload
  88.        /B:n          -  BBS type
  89.                         0 - None [default]
  90.                         1 - ProDoor, 2 - PCBoard, 3 - ProDoor 3.44
  91.        /C:[filename] -  Use options in configuration file
  92.        /D            -  Duplicate checking using 32 bit CRC's
  93.        /E            -  Erase Invalid GIF's
  94.        /F:filename   -  Name of Description file
  95.        /L:[filename] -  Keep a log of GIFs
  96.        /M:nnXnnXnn   -  Minimum resolution to accept
  97.        /N:n          -  Node Number (requires GIFTEST.CFG)
  98.        /P:n          -  COM port numer [1 - 4]
  99.        /R:n          -  Position of resolution in description
  100.                         0 - First word on first line
  101.                         1 - Last word on first line [default]
  102.                         2 - Last word on last line
  103.                         3 - Last line by itself
  104.        /S            -  Skip GIF testing
  105.        /T:n          -  Type of resolution used
  106.                         1 - Enclosed with brackets [default]
  107.                         2 - No brackets
  108.        /U            -  Convert description to uppercase
  109.     
  110.     To use GIFtest, just type "GIFTEST filename.gif" at the DOS prompt
  111.     and GIFtest will tell you the size of the GIF and whether or not it
  112.     passed testing.
  113.  
  114.     GIFtest will also exit with one of the following Errorlevels to
  115.     help you identify what happened in batch files, or programs that
  116.     use GIFtest (such as ZipLab).
  117.  
  118.     Result                                                        ErrorLevel
  119.     GIF passed all tests                                               0
  120.     Invalid Header or Incomplete Image                                 1
  121.     File Not Found                                                     5
  122.     Invalid Command Line Option                                        5
  123.     GIFLITE'd                  [passed all other tests]               10
  124.     Failed Minumum Resolution  [passed other tests]                   20
  125.     Duplicate CRC found        [passed other tests]                   25
  126.     No Description Found       [passed all other tests]               60
  127.     Unknown Error              [programmer goofed]                   255
  128.  
  129. Making GIFs Private: /A
  130.  
  131.    Sometimes, sysops will have problems where users will upload adult
  132.    GIFs to a public file area.  You can remedy this several different
  133.    ways..  You can make all uploads private, you can get nasty and delete
  134.    the offending user(s), or you can use GIFtest to force all GIFs to be
  135.    private uploads, leaving the rest of your files alone using the "/A"
  136.    switch on the command line or in GIFTEST.CFG..
  137.  
  138.    WARNING!  This only works with ProDoor and PCBoard systems which use
  139.    GIFtest to modify the description.
  140.  
  141.  
  142. Modifying Descriptions: /B:n
  143.  
  144.    The only feature of the original GIFtest was to place the resolution
  145.    of the GIF into the description typed by users of ProDoor where I
  146.    wanted it.  Since then, many sysops have contacted me, asking that
  147.    I allow the same time of feature for their BBS type as well.
  148.    Unfortunately, the only people to give me the necessary information
  149.    have been PCBoard SysOps, so starting with 4.0, GIFtest supports
  150.    descriptions for ProDoor and PCBoard.
  151.  
  152.    However, GIFtest doesn't know which type of BBS is running,
  153.    so you'll need to tell it with the /B parameter.
  154.     /B:0 means ignore ProDoor and PCboard descriptions, just test
  155.         the GIF
  156.     /B:1 means your running ProDoor and search for $DOOR.NAM to
  157.          modify the description
  158.     /B:2 means your running PCBoard and search for UPDESC[.N] to
  159.          modify the description
  160.     /B:3 means your running ProDoor 3.44 dated after 12/31/91 and
  161.          search for $DOOR.NAM to modify the description
  162.  
  163.    If you use the /B:n option and GIFtest does not find the description file
  164.    or does not find the description inside the description file for the GIF
  165.    and the GIF passes all tests, GIFtest will exit with ErrorLevel 40.
  166.  
  167.    ProDoor Descriptions:
  168.  
  169.      ProDoor stores the name and descriptions of uploaded files in a file
  170.      called $DOOR.NAM which is kept in the default directory for each node.
  171.      For example, if your PRODOOR batch file called ProDoor with the options
  172.      PRODOOR PROD.CNF C:\PCB, then $DOOR.NAM will be found in the directory
  173.      C:\PCB.  So, you can call GIFtest with:
  174.  
  175.          GIFTEST %1 /B:1 /F:C:\PCB\$DOOR.NAM
  176.  
  177.      Which will tell GIFtest that the description file C:\PCB\$DOOR.NAM
  178.      uses the ProDoor format for storing descriptions.
  179.  
  180.    PCBoard Descriptions:
  181.  
  182.      PCBoard stores the name and descriptions of uploaded files in a file
  183.      called UPDESC[.n], where the [.n] is the node number if you are running
  184.      a multinode BBS.  So node 1 would be UPDESC.1, node 2 is UPDESC.2, etc..
  185.      The location of this file depends on how you have PCBOARD.DAT setup,
  186.      if you have specified a "work" directory in PCBSETUP, then this file
  187.      is placed in that work directory.  If not, then it is kept im the
  188.      default PCB directory for each node.  If you are using PCBoard 14.5a
  189.      the easiest way to find the UPDESC[.n] file for each node is to put
  190.  
  191.           echo %3 > UPDESC.LOC
  192.  
  193.      at the top of your PCBTEST.BAT file.  This will echo the third parameter
  194.      (the name and location of the UPDESC[.n] file) to the file UPDESC.LOC
  195.      which you can then type to see where PCBoard is keeping it.  This is
  196.      only important for you to know if you are running GIFtest from within
  197.      a program like ZipLab.  If you are calling GIFtest directly from
  198.      within your PCBTEST file, you need only add the option "/F:%3" to the
  199.      command line and PCBoard will pass the name and location of the
  200.      description file to GIFtest for you.
  201.  
  202.      WARNING!:  Do NOT use the name of any of your DIRx files, especially
  203.      your upload directory file, this will get destroyed.
  204.  
  205.  
  206. Configuration File: /C:[filename]
  207.  
  208.    Some programs like ZipLab shell out to GIFtest in order to test GIF
  209.    files...however, they may not allow you to include the defaults you
  210.    want to test the GIF with.  To help with this, GIFTEST will let you
  211.    store all your defaults into a config file.  The default name is
  212.    GIFTEST.CFG, but you can pass any filename on the command line with
  213.    the "/C:[filename]" switch.  If a filename is not specified, then
  214.    GIFTEST.CFG is assumed.
  215.  
  216.    The top line of the configuration file is the DOS command line
  217.    you want to use for GIFtest.  Each line after that is the
  218.    name and location for the description file for the BBS you run
  219.    for each node.
  220.  
  221.      Example:
  222.        /E/L                       ;Erase bad GIFs, Keep a log file
  223.        C:\PRO\NODE1\$DOOR.NAM     ;location of description file for node 1
  224.        C:\PRO\NODE2\$DOOR.NAM     ;location of description file for node 2
  225.  
  226.    To get the current node number, GIFtest either expects it on the command
  227.    line [see /N], or expects to find the environment variable "PCBNODE=n"
  228.    where "n" is the node number.
  229.  
  230.    Any options found in the configuration file take precedence over command
  231.    line parameters.  If you have /B:0 on the command line, but GIFtest finds
  232.    /B:1 in the configuration file, then GIFtest will use the /B:1 option.
  233.  
  234.  
  235. Checking for Duplicate Files: /D
  236.  
  237.    A major problem with GIFs today is that users will rename them and
  238.    re-upload them to a BBS to get upload credits.  Before GIFtest, there
  239.    was no way to test if a file was actually a GIF, however, even if the
  240.    file is a GIF, it could be a duplicate file.  To combat this, GIFtest
  241.    calculates a 32bit CRC for each uploaded GIF using the same method as
  242.    PKZIP and ARJ and places that CRC into your GIFLOG file (if you keep
  243.    one).  You can then use the "/D" parameter to have GIFtest scan this
  244.    log for a duplicate CRC and return an errorlevel if one is found.
  245.  
  246.    WARNING!:  GIFtest does NOT do duplicate checking by default, but it
  247.    will log all CRC's of complete GIFs if they pass testing.
  248.  
  249.  
  250. Erasing bad GIFs: /E
  251.  
  252.    While GIFtest does exit with an Errorlevel to indicate the failure of a
  253.    GIF to pass all tests, some users don't with to catch these errors in a
  254.    BATch file to see if the file needs to be deleted.
  255.  
  256.    The /E option will erase any GIF not passing all of the tests.
  257.  
  258.    If GIFtest is unable to erase the GIF, it will exit with errorlevel set
  259.    to 255 (programmer goof).
  260.  
  261.  
  262. Passing the description filename: /F:filename
  263.  
  264.    You can use the "/F:filename" parameter to pass the name and location
  265.    of the description file for GIFtest to alter.  This is especially useful
  266.    with PCBoard 14.5a multi-node systems where you are calling GIFtest
  267.    directly from PCBTEST.BAT and can pass the %3 parameter from PCBoard
  268.    directly to GIFtest, such as:
  269.  
  270.       GIFTEST %1 /B:2 /F:%3
  271.  
  272.    WARNING!:  This only works with PCBoard and ProDoor descriptions.
  273.  
  274.  
  275. Log all checked GIFs: /L:[logfilename]
  276.  
  277.    GIFtest can log all tested GIFs to a file which can help you in
  278.    tracking duplicates, resolutions, and user activities.  If you
  279.    don't specify a filename, the name GIFLOG is used.
  280.  
  281.    The format for the log file is:
  282.  
  283.     FILENAME.GIF 999999 01-01-91 [9999xx9999x999] 9999 OK GL FFFFFFFF
  284.     ─────┬────── ──┬─── ────┬─── ────────┬─────── ─┬── ┌─ ┌─ ┌───────
  285.          │         │        │            │         │   │  │  └ 32 bit CRC
  286.          │         │        │            │         │   │  └ GIFLITE'd
  287.          │         │        │            │         │   └ Status
  288.          │         │        │            │         │       OK
  289.          │         │        │            │         │       IM Incomplete Image
  290.          │         │        │            │         │       IV Invalid Header
  291.          │         │        │            │         └ Trimmed Bytes
  292.          │         │        │            └ Resolution
  293.          │         │        └ Current Date
  294.          │         └ File Size
  295.          └ File Name
  296.  
  297.